fix(runner): skip exception capture for matched aborts#821
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
A matched abort case in runLinearProgram (e.g. the self-driving skill emitting `[ABORT] github connection declined`) is an expected, user-driven outcome that is already surfaced through a friendly error outro. Previously every abort — matched or not — built a WizardError and handed it to wizardAbort(), which unconditionally calls analytics.captureException(), spawning a spurious error-tracking issue for a normal user decision. Only pass an `error` to wizardAbort() for genuine, unmatched aborts. The `agent aborted` product-analytics event still fires either way, so no real signal is lost. Generated-By: PostHog Code Task-Id: 99261312-1bbc-4d65-86ba-e179b8e7b042
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The team gets spurious error-tracking issues whenever a user declines the GitHub connection during self-driving setup, even though nothing broke. When the self-driving skill emits
[ABORT] github connection declined, the wizard handles it gracefully with a friendly outro — butrunLinearProgrambuilt aWizardErrorfor every abort, including these matched, expected cases, and handed it towizardAbort(), which unconditionally callsanalytics.captureException(). So a normal user decision got logged as aWizardErrorexception and spawned an error-tracking issue. This hits the team (noise / false alerts), not end users; it recurs on every GitHub decline as self-driving open beta grows.Changes
Skip the exception capture for matched abort cases — these are expected, user-driven outcomes already surfaced via
outroData. Inlinear.ts, only pass anerrortowizardAbort()when the abort did not match a known abort case. Genuine, unmatched aborts still capture, and the existingwizardCapture('agent aborted', …)product-analytics event fires either way, so no real signal is lost.Test plan
Added
linear-abort.test.tscovering both branches: a matched abort case passes noerrortowizardAbort(no exception captured), while an unmatched abort still passes aWizardError. Full suite green (1212 tests), lint clean.LLM context
Authored by PostHog Code (Claude) from an inbox report. Change is scoped to the abort branch of the linear runner.
Created with PostHog Code from an inbox report.